﻿@model IEnumerable<OWE.Core.Domain.AccountMove>

@{
    ViewBag.Title = "List";
    Layout = "~/Views/Shared/_MainLayout.cshtml";
}

<h2>List</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Code)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AccountTypeName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Debit)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Credit)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Balance)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Code)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.AccountTypeName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Debit)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Credit)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Balance)
            </td>

            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
            @Html.ActionLink("Details", "Details", new { id = item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.Id })
            </td>
        </tr>
    }

</table>
